<template>
    <div class="gathering">
        <div class="data-content">
            <Form :model="formdata" label-position="right" :label-width="160">
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="账号限制规则：" prop="user_regex">
                            <Input v-model="formdata.user_regex"/>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p>新建用户时只能包含的字符和符号.</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="代理商账户：">
                            上级账号的<Input v-model="formdata.agent_prefix" style="width: 60px;"/>位，
                            输入<Input v-model="formdata.agent_min"  style="width: 60px;"/>位，
                            至<Input v-model="formdata.agent_max"  style="width: 60px;"/>位
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="代理分层限制：" prop="代理分层限制">
                            <Input v-model="formdata.代理分层限制"/>
                            <span class="cred">查看 <span class="fwbold">《申明》</span></span>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999 ercode">
                        <p class="cred">本系统为模拟真实环境交易，建议响应国家号召代理分层限制在<span class="fwbold">三层</span>以内！</p>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="会员账号：">
                            上级账号的<Input v-model="formdata.user_member_prefix" style="width: 60px;"/>位，
                            输入<Input v-model="formdata.user_member_min"  style="width: 60px;"/>位，
                            至<Input v-model="formdata.user_member_max"  style="width: 60px;"/>位
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="密码限制：">
                            <Input v-model="formdata.min_password"  style="width: 60px;"/>
                            至<Input v-model="formdata.max_password"  style="width: 60px;"/>位
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="名称限制：">
                            <Input v-model="formdata.user_name_min"  style="width: 60px;"/>
                            至<Input v-model="formdata.user_name_max"  style="width: 60px;"/>位
                        </FormItem>
                    </Col>
                </Row>
                <Row type="flex" justify="space-between" class="code-row-bg">
                    <Col span="9">
                        <FormItem label="Ssssion时间：" prop="alipay_qrcode">
                            <Select v-model="formdata.cookie_length" placeholder="">
                                <Option :value="item.value" v-for="item in cookie_list" v-html="item.label"></Option>
                            </Select>
                        </FormItem>
                    </Col>
                    <Col span="15" class="c999">
                        <p>这里的时间是用户登陆保持时间,超出这个时间无动作则自动踢出.</p>
                    </Col>
                </Row>

                <FormItem>
                    <Button type="primary" @click="handleSubmit()" :loading="send_loading">确定</Button>
                </FormItem>

            </Form>

        </div>
    </div>
</template>
<style>
    .gathering .c999 p{
        line-height: 27px;
    }
    .gathering .ivu-form-item{
        margin-bottom: 0;
    }
    .gathering .ivu-input-wrapper ,.gathering .ivu-select{
        width: 250px;
    }
</style>
<script>
    import WrapperContent from '../../../components/wrapper-content.vue'
    import {
        getUserList,
        getUser,
        getLevelList,
        getPositionList,
        doUserInfo,
        delUser,
        changeUserState
    } from "@/api/user";
    import * as utils from '../../../assets/js/utils'
    import $ from 'jquery'
    import _ from 'lodash'

    export default {
        components: {
            WrapperContent
        },
        data() {
            return {
                loading: false,
                formdata: {
                    user_regex:'',
                    agent_prefix:'',
                    agent_min:'',
                    agent_max:'',
                    agent_floor:'',
                    user_member_prefix:'',
                    user_member_min:'',
                    user_member_max:'',
                    min_password:'',
                    max_password:'',
                    user_name_min:'',
                    user_name_max:'',
                    cookie_length:'600',
                },
                send_loading: false,
                cookie_list:[
                    {value:'600',label:'10分钟'},
                    {value:'1800',label:'30分钟'},
                    {value:'3600',label:'1小时'},
                    {value:'12000',label:'2小时'},
                    {value:'24000',label:'3小时'},
                    {value:'86400',label:'1天'},
                    {value:'2592000',label:'30天'},
                    {value:'7776000',label:'90天'},
                ]
            }
        },
        created: function () {
            this.loading = false;
        },
        methods: {
            handleSubmit() {
                this.send_loading = true;
                setTimeout(() => {
                    this.send_loading = false;
                }, 2000)
            },
        }
    }
</script>





























